package com.action;

import com.dao.ITabAttendanceDao;
import com.dao.ITabSalesdetailDao;
import com.opensymphony.xwork2.ModelDriven;
import com.po.TabAttendance;
import com.po.TabSalesdetail;

public class TabSalesdetailAction extends BaseAction implements ModelDriven<TabSalesdetail>
{

	TabSalesdetail form = new TabSalesdetail();
	public TabSalesdetail getModel(){
		return form;
	}
	private ITabSalesdetailDao tabSalesdetailDao;
	public void setTabSalesdetailDao(ITabSalesdetailDao tabSalesdetailDao){
		this.tabSalesdetailDao = tabSalesdetailDao;
	}

	public String findByList(){
		form.setPager_count(tabSalesdetailDao.findByCount(form));
		form.setTabsdlist(tabSalesdetailDao.findByList(form));
		return SUCCESS;
	}

	public String deleteObject(){
		tabSalesdetailDao.deleteObejct(form);
		findByList();
		return SUCCESS;
	}

	public String updateObject(){
		tabSalesdetailDao.updateObject(form);
		return "update";
	}

	

}
